home *** CD-ROM | disk | FTP | other *** search
- #if 0
-
- #ifndef CLIPPINGFOLDER_H
- #include "ClippingFolder.h"
- #endif
-
- CClippingFolder::CClippingFolder ()
- {
- }
-
- CClippingFolder::~CClippingFolder ()
- {
- }
-
- void CClippingFolder::CheckForNewClippings ()
- {
- static unsigned long nextCheck = 0;
- static unsigned long folderModDate = 0;
-
- CInfoPBRec pb;
- Str255 name;
- long dirID;
-
- if (TickCount () < nextCheck)
- return;
-
- nextCheck = TickCount () + kWatchFolderDelay;
-
- OSErr error = FlyPaperFindFolder (kOnSystemDisk, kClippingsFolder, true, &pb.hFileInfo.ioVRefNum,
- &dirID);
- if (error)
- return;
-
- pb.hFileInfo.ioNamePtr = name;
- pb.hFileInfo.ioFDirIndex = -1;
- pb.hFileInfo.ioDirID = dirID;
- error = PBGetCatInfoSync (&pb);
- if (error)
- return;
-
- if (pb.dirInfo.ioDrMdDat != folderModDate) {
- folderModDate = pb.dirInfo.ioDrMdDat;
- for (pb.hFileInfo.ioFDirIndex = 1; ; ++pb.hFileInfo.ioFDirIndex) {
-
- pb.hFileInfo.ioDirID = dirID;
- if (PBGetCatInfoSync (&pb))
- break;
-
- if (pb.hFileInfo.ioFlFndrInfo.fdType != kClippingFileType)
- continue;
-
- CClippingFile* file =;
-
-
- if (index < 0) {
- FlyPaperAuxDataHandle auxData;
-
- if (GetClippingFileAuxData (id, auxData))
- return;
-
- clipping.clippingID = id;
- clipping.thumbnail = CThumbnail::NewThumbnail (id);
- if (clipping.thumbnail)
- clipping.thumbnail -> GetWindowBounds (clipping.windowBounds);
- else
- SetRect (&clipping.windowBounds, 0, 0, 40, 20);
- CalcWindowPosition ((**auxData).dropSpot, clipping.windowBounds, 0, clipping.onLeft);
- clipping.window = nil;
- DisposeHandle ((Handle) auxData);
- AppendClipping (clipping);
- }
- }
- }
- }
-
- #endif
-